package com.example.camunda.dto;

import lombok.Data;
import org.camunda.bpm.engine.repository.DecisionDefinition;
import org.springframework.beans.BeanUtils;

/**
 * 决策定义DTO
 *
 * @author heshao
 * @date 2021/11/10 14:46
 **/
@Data
public class DecisionDefinitionDto {
    private String id;
    private String key;
    private String category;
    private String name;
    private int version;
    private String resource;
    private String deploymentId;
    private String tenantId;
    private String decisionRequirementsDefinitionId;
    private String decisionRequirementsDefinitionKey;
    private Integer historyTimeToLive;
    private String versionTag;

    public static DecisionDefinitionDto from(DecisionDefinition definition) {
        DecisionDefinitionDto dto = new DecisionDefinitionDto();
        BeanUtils.copyProperties(definition, dto);
        return dto;
    }

}
